#xxxxxxxxxxxxxxxxxxxxxxxxxxx 收集并拷贝运行时依赖
#安装主程序
# install(TARGETS ${MYEXE} DESTINATION bin)
install(TARGETS demo RUNTIME DESTINATION bin)

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/runtime/
    DESTINATION lib
    USE_SOURCE_PERMISSIONS
    # COMPONENT conan_runtime # ← 这里只是起个名字，与 Conan 无关
    )   

include(InstallRequiredSystemLibraries)


#==========================
set(CPACK_GENERATOR "ZIP")       # Windows 用 ZIP/NSIS, macOS 用 DragNDrop
set(CPACK_PACKAGE_NAME "Demo")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_SOURCE_DIR}/dist_package")
include(CPack)